package com.cloud.basic.Advance.Design.SingletonPattern;

/**
 * @program: basic
 * @description: 懒汉模式(线程安全)
 * @author: Cloud
 * @create: 2022/2/23 15:32:38
 */
public class Singleton3 {

    public static Singleton3 singleton3 = null;

    public Singleton3() {
    }

    public static Singleton3 getInstance() {
        if (singleton3 == null) {
            singleton3 = new Singleton3();
        }
        return singleton3;
    }
}
